-- card: 6957 from stack: in -- bmap block id: 0 -- flags: 4000 -- background id: 4755 -- name: index ----- HyperTalk script ----- on idle if the scroll of card field "topic" is not the scroll of card field "card id" then if the selectedField is "card field" && (the number of card field "topic") then set the scroll of card field "card id" to the scroll of card field "topic" else set the scroll of card field "topic" to the scroll of card field "card id" end if end if pass idle end idle on returnInField send returnInField to HyperCard if word 2 of the selectedLine > the number of lines in card field (word 3 of the selectedField) then type numToChar(32) type numToChar(8) end if if (the scroll of card field "topic" is not the scroll of card field "card id") then put the selectedLine into currentLine if the selectedField is "card field" && (the number of card field "topic") then set the scroll of card field "card id" to the scroll of card field "topic" else set the scroll of card field "topic" to the scroll of card field "card id" end if select before currentLine end if end returnInField on enterInField send enterInField to HyperCard if word 2 of the selectedLine > the number of lines in card field (word 3 of the selectedField) then type numToChar(32) type numToChar(8) end if if the scroll of card field "topic" is not the scroll of card field "card id" then put the selectedLine into currentLine if the selectedField is "card field" && (the number of card field "topic") then set the scroll of card field "card id" to the scroll of card field "topic" else set the scroll of card field "topic" to the scroll of card field "card id" end if select before currentLine end if end enterInField function noBlanksFound set cursor to watch -- get rid of trailing blank lines: put true into inLoop repeat while inLoop get the number of lines of card field "topic" if line it of card field "topic" is "" and it > 0 then select after line it+1 of card field "topic" type the numToChar of 8 else put false into inLoop end if end repeat put true into inLoop repeat while inLoop get the number of lines of card field "card id" if line it of card field "card id" is "" and it > 0 then select after line it+1 of card field "card id" type the numToChar of 8 else put false into inLoop end if end repeat send idle -- continue function: put true into noBlanks get the number of lines of card field "topic" if it is the number of lines of card field "card id" then put it into numLines repeat with x=1 to numLines get line x of card field "topic" if it is "" or line x of card field "card id" is "" then put false into noBlanks end if end repeat else put false into noBlanks end if return noBlanks end noBlanksFound on updateIndex global deletedCard set cursor to watch put 1 into x repeat until x > 18 get line x of card field "topic" of card "index" if it is not "" then if x > 1 then if it is line x-1 of card field "topic" of card "index" then get "" end if end if put it into line x of card field "item" of card (the number of me) get line x of card field "card id" of card "index" if it is word 3 of deletedCard then delete line x of card field "topic" of card "index" delete line x of card field "card id" of card "index" subtract 1 from x else get idToNumber(it) put it into line x of card field "page" of card (the number of me) end if else put "" into line x of card field "item" of card (the number of me) put "" into line x of card field "page" of card (the number of me) end if add 1 to x end repeat put 1 into x repeat until x > 18 get line x+18 of card field "topic" of card "index" if it is not "" then if x > 1 then if it is line x+17 of card field "topic" of card "index" then get "" end if end if put it into line x of card field "item2" of card (the number of me) get line x+18 of card field "card id" of card "index" if it is word 3 of deletedCard then delete line x+18 of card field "topic" of card "index" delete line x+18 of card field "card id" of card "index" subtract 1 from x else get idToNumber(it) put it into line x of card field "page2" of card (the number of me) end if else put "" into line x of card field "item2" of card (the number of me) put "" into line x of card field "page2" of card (the number of me) end if add 1 to x end repeat put (the number of me) + 1 into nextCard if nextCard <= the number of cards then get the name of card nextCard get word 2 of it get char 2 to 6 of it if it is "index" then send updateIndex to card nextCard end if end if end updateIndex -- part 5 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=14 top=60 right=300 bottom=182 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: item -- part 17 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=7 top=57 right=300 bottom=502 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 8 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=99 top=37 right=55 bottom=339 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: instructions -- part 6 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=14 top=60 right=300 bottom=234 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: page ----- HyperTalk script ----- on mousedown set lockScreen to true set lockText of me to false click at the clickLoc click at the clickLoc get the selection set lockText of me to true set lockScreen to false if it is not "" then push card global xrefdepth add 1 to xrefdepth visual iris open show background button "return" go card it else select empty end if end mouseDown -- part 1 (button) -- low flags: 00 -- high flags: A003 -- rect: left=365 top=26 right=43 bottom=467 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Add Entry ----- HyperTalk script ----- on mouseUp set scroll of card field "topic" to 0 set scroll of card field "card id" to 0 show card button "beep" show card button "Item" show card button "Card ID" show card field "topic" show card field "card id" hide card button "Add Entry" show card button "Done Changes" show card button "Alphabetize" end mouseUp -- part 10 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=274 top=60 right=300 bottom=442 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: item2 -- part 9 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=274 top=60 right=300 bottom=494 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: page2 ----- HyperTalk script ----- on mousedown set lockScreen to true set lockText of me to false click at the clickLoc click at the clickLoc get the selection set lockText of me to true set lockScreen to false if it is not "" then push card global xrefdepth add 1 to xrefdepth visual iris open show background button "return" go card it else select empty end if end mouseDown -- part 14 (button) -- low flags: 80 -- high flags: 0000 -- rect: left=1 top=21 right=340 bottom=510 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: beep ----- HyperTalk script ----- on mouseUp beep end mouseUp -- part 2 (button) -- low flags: 80 -- high flags: A003 -- rect: left=366 top=26 right=43 bottom=467 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Done Changes ----- HyperTalk script ----- on mouseUp if noBlanksFound() then hide card button "beep" hide card button "Item" hide card button "Card ID" hide card field "topic" hide card field "card id" hide card button "Done Changes" show card button "Add Entry" hide card button "Alphabetize" show card field "updating" send updateIndex hide card field "updating" else answer "Blank field found." end if end mouseUp -- part 3 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=115 top=98 right=281 bottom=292 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 4 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: topic -- part 4 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=275 top=98 right=281 bottom=350 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 4 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: card id -- part 11 (button) -- low flags: 80 -- high flags: 8002 -- rect: left=115 top=78 right=100 bottom=277 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Item -- part 12 (button) -- low flags: 80 -- high flags: 8002 -- rect: left=275 top=78 right=100 bottom=350 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Card ID -- part 13 (button) -- low flags: 80 -- high flags: A003 -- rect: left=366 top=44 right=61 bottom=468 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alphabetize ----- HyperTalk script ----- on mouseUp answer "Are you sure (may take several minutes)?" with "Go Ahead" or "Cancel" if it is "Go Ahead" then if noBlanksFound() then put card field "topic" into tempt put card field "card id" into tempd set cursor to watch show card field "busy" put the number of lines of tempt into numLines repeat with x=1 to numLines if the mouse is "down" then exit repeat end if repeat with y=x+1 to numLines if the mouse is "down" then exit repeat end if if line y of tempt < line x of tempt or (line y of tempt = line x of tempt and idToNumber(line y of tempd) < idToNumber(line x of tempd)) then put line x of tempt into temp1 put line y of tempt into line x of tempt put temp1 into line y of tempt put line x of tempd into temp2 put line y of tempd into line x of tempd put temp2 into line y of tempd end if end repeat end repeat hide card field "busy" put tempt into card field "topic" put tempd into card field "card id" else answer "Blank field found." end if beep end if end mouseUp -- part 15 (field) -- low flags: 81 -- high flags: 0004 -- rect: left=101 top=143 right=188 bottom=364 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: busy -- part 16 (field) -- low flags: 81 -- high flags: 0004 -- rect: left=156 top=120 right=205 bottom=356 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: updating -- part contents for background part 7 ----- text ----- 19 -- part contents for background part 6 ----- text ----- Index -- part contents for card part 5 ----- text ----- bookmarks buttons, adding buttons, deleting buttons, developer card id cards, adding cards, deleting compacting stack Contents, Table of Contents (cont) card fields, adding -- part contents for card part 6 ----- text ----- 6 14 14 7 9 7 9 11 11 15 6 7 13 15 7 11 15 13 -- part contents for card part 8 ----- text ----- (click on the topic or page no. of interest) -- part contents for card part 9 ----- text ----- 13 6 7 11 8 11 15 6 8 7 9 11 5 4 7 8 9 13 -- part contents for card part 10 ----- text ----- fields, deleting footnotes Help card Index (cont) card Index card page numbers printing scripts -- part contents for card part 15 ----- text ----- Alphabetizing... Hold down mouse button to stop. -- part contents for card part 16 ----- text ----- Updating index. Please wait... -- part contents for card part 3 ----- text ----- bookmarks buttons, adding buttons, deleting buttons, developer buttons, developer card id card id cards, adding cards, deleting compacting stack Contents, Table of Contents, Table of Contents, Table of Contents, Table of Contents (cont) card Contents (cont) card Contents (cont) card fields, adding fields, deleting footnotes footnotes Help card Index (cont) card Index (cont) card Index (cont) card Index card Index card page numbers page numbers page numbers printing scripts scripts scripts scripts scripts scripts Shafer, Dan Shafer, Dan user level user level -- part contents for card part 4 ----- text ----- 4342 9080 9080 2542 6753 2542 6753 8539 8539 3295 4342 2542 8871 3295 2542 8539 3295 8871 8871 4342 2542 8539 5118 8539 3295 4342 5118 2542 6753 8539 7205 3971 2542 5118 6753 8871 3295 3971 2231 3971 3295 -- part contents for background part 17 ----- text ----- p6